package base_de_datos;
import java.sql.*;
import javax.swing.JOptionPane;


/**
 *
 * @author MGL
 */
public class conexionbd {
    /**
     *
     */
    public String db= "acafeto";
    /**
     *
     */
    public String url= "jdbc:mysql://localhost/"+db;
    /**
     *
     */
    public String user= "root";
    /**
     *
     */
    public String pass= "123";
   
    /**
     *
     * @return
     */
    public Connection conectar()
{
     Connection link =null;
try
{
Class.forName("org.gjt.mm.mysql.Driver");
link = DriverManager.getConnection(this.url,this.user,this.pass);

}
catch (Exception e) 
    {
        JOptionPane.showMessageDialog(null,"error"+e);
    }
return link;
} 

    /**
     *
     * @param user
     * @param contra
     * @return
     */
    public boolean ingresar(String user, String contra) {
        throw new UnsupportedOperationException("Not yet implemented");
    }
    
}





